import Vue from 'vue'
import App from './App.vue'

/* 路由引入 */
import VueRouter from 'vue-router';
import Student from './components/Student.vue';
import Test from './components/Test.vue';
Vue.use(VueRouter);
/* 配置路由 */
const routes = [{
		path: '/stu',
		component: Student
	}, {
		path: '/test',
		component: Test
	},
	{
		path: '*',
		redirect: '/stu'
	} /*默认跳转路由*/
]

const router = new VueRouter({
	routes // （缩写）相当于 routes: routes
})


/* 引入element-ui组件 */
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

Vue.config.productionTip = false

new Vue({
	router,
	render: h => h(App),
}).$mount('#app')
